// - 引入vue
import { createApp } from "vue";
// - 引入pinia
import { createPinia } from "pinia";
// - 引入根组件
import App from "./App.vue";
// - 引入路由
import router from "./router";
// - 引入element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// - element-plus 汉化
import zhCN from "element-plus/es/locale/lang/zh-cn";
// - 引入全局样式
import "@/assets/css/index.scss";
// - 引入 Font Awesome 图标库
import { library } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { fas } from '@fortawesome/free-solid-svg-icons';

const app = createApp(App);

// - 将所有 solid 图标添加到库中
library.add(fas);
// - 注册一个fontawesome图标组件
app.component('fa-icon', FontAwesomeIcon);

app.use(createPinia());
app.use(router);
app.use(ElementPlus, {
  locale: zhCN
});

app.mount("#app");
